home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Auge 4000
/
Auge 4000 #77 (1994-02-10)(Amiga User Gruppe Einzugsgebiet 4000).zip
/
Auge 4000 #77 (1994-02-10)(Amiga User Gruppe Einzugsgebiet 4000).adf
/
Write
/
WRITE.lha
/
WRITEV3.371.lha
/
REXX
/
mailer.wrx
< prev
next >
Wrap
Text File
|
1993-12-26
|
2KB
|
97 lines
/*
* dieses Script arbeitet genauso wie open.wrx nur das es anstatt
* dem voreingestellten Konfigurationfile, den Konfigurationsfile
* "MAILER.config" läd
*
* usage : rx MAILER.wrx [#screen] [#run] FileName
*
* CHANGE PATH IN MARKED LINE TO YOUR WRITE-PATH !!!!
*
*/
IF ~show('P',"WRITE")
THEN DO
ADDRESS "COMMAND"
"run >NIL: <NIL: dh0:WRITE" /* Change this to your Path ! */
"SYS:REXXC/WaitForPort <NIL: >NIL: WRITE"
END
PARSE ARG A.1 A.2 A.3
runit = FALSE
screenit = FALSE
FileName = ""
DO i = 1 TO 3
IF A.i="#run" THEN DO
runit = TRUE
END
ELSE DO
IF A.i="#screen" THEN DO
screenit = TRUE
END
ELSE DO
IF A.i~="" THEN DO
FileName=A.i
END
END
END
END
FileName=strip(FileName)
FileName=strip(FileName,'B','"')
IF length(FileName)~=0
THEN DO
IF pos(':',FileName)=0
THEN DO
DirName=pragma('D')
IF right(DirName,1)~=':' THEN
DirName=DirName||'/'
FileName=DirName||FileName
END
END
ADDRESS "WRITE"
OPTIONS RESULTS
'NEWED "MAILER.CONFIG"'
ID = RESULT
OPENPORT ID
Port = RESULT
IF Port = ""
THEN DO
"MESSAGEOK (REXX-script 'mailer.wrx' :\nSorry, no more private ports!)"
EXIT
END
INTERPRET ADDRESS Port
"WINDOW 0 0 0 0"
"SETVAR (_Path) ("||FileName||")"
IF length(FileName)~=0
THEN DO
IF exists(FileName) then
"OPEN ("||FileName||")"
ELSE
"SETVAR (_FileName) ("||FileName||")"
END
IF (screenit = TRUE) & (runit = FALSE) THEN DO
MODIFYSCREEN 0
END
IF (runit = FALSE) THEN DO
WAITPORT ID
END
IF (screenit = TRUE) & (runit = FALSE) THEN DO
IF show('P',"WRITE") THEN DO
ADDRESS "WRITE"
MODIFYSCREEN 1
END
END